/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.own.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 出库信息Entity
 * @author F
 * @version 2019-09-27
 */
@Table(name="own_out_information", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一ID", isPK=true),
		@Column(name="own_medicine_receipt_information_id", attrName="ownMedicineReceiptInformationId", label="药材收获信息ID", isQuery=false),
		@Column(name="own_medicine_assignment_id", attrName="ownMedicineAssignmentId", label="药材赋码信息ID", isQuery=false),
		@Column(name="processing_name", attrName="processingName", label="企业名称", queryType=QueryType.LIKE),
		@Column(name="time", attrName="time", label="出库时间"),
		@Column(name="new_corp_name", attrName="newCorpName", label="新货主企业名称", queryType=QueryType.LIKE),
		@Column(name="new_corp_code", attrName="newCorpCode", label="新货主企业编码"),
		@Column(name="weight_all", attrName="weightAll", label="出库总重量", comment="出库总重量(kg)"),
		@Column(name="out_batch_amount", attrName="outBatchAmount", label="合计金额", comment="合计金额(元)"),
		@Column(name="out_type", attrName="outType", label="出库对象"),
		@Column(name="batch_id", attrName="batchId", label="药材/饮片批次号"),
		@Column(name="spec", attrName="spec", label="规格"),
		@Column(name="batch_weight_all", attrName="batchWeightAll", label="出库总重量小计", comment="出库总重量小计(kg)"),
		@Column(name="unitprice", attrName="unitprice", label="单价", comment="单价(元/kg)"),
		@Column(name="source_code", attrName="sourceCode", label="商品编码"),
		@Column(name="bm_trace_code", attrName="bmTraceCode", label="追溯码"),
		@Column(name="create_company", attrName="createCompany", label="所属企业标识", isUpdate=false, isQuery=false),
		@Column(name="contents_id", attrName="contentsId", label="目录ID", isUpdate=false, isQuery=false),
		@Column(name ="uuid",attrName ="uuid",label = "操作标识符"),
		@Column(name="txid",attrName ="txid",label = "返回的txid"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class OwnOutInformation extends DataEntity<OwnOutInformation> {
	
	private static final long serialVersionUID = 1L;
	private String ownMedicineReceiptInformationId;		// 药材收获信息ID
	private String ownMedicineAssignmentId;		// 药材赋码信息ID
	private String processingName;		// 企业名称
	private Date time;		// 出库时间
	private String newCorpName;		// 新货主企业名称
	private String newCorpCode;		// 新货主企业编码
	private Double weightAll;		// 出库总重量(kg)
	private Double outBatchAmount;		// 合计金额(元)
	private String outType;		// 出库对象
	private String batchId;		// 药材/饮片批次号
	private String spec;		// 规格
	private Double batchWeightAll;		// 出库总重量小计(kg)
	private Double unitprice;		// 单价(元/kg)
	private String sourceCode;		// 商品编码
	private String bmTraceCode;		// 追溯码
	private String createCompany;		// 所属企业标识
	private String contentsId;  // 父ID
	private String uuid;		//索引本次操作的上下文标识
	private String txid;


	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getTxid() {
		return txid;
	}

	public void setTxid(String txid) {
		this.txid = txid;
	}

	public OwnOutInformation() {
		this(null);
	}

	public OwnOutInformation(String id){
		super(id);
	}

	@NotBlank(message="药材收获信息ID不能为空")
	@Length(min=0, max=64, message="药材收获信息ID长度不能超过 64 个字符")
	public String getOwnMedicineReceiptInformationId() {
		return ownMedicineReceiptInformationId;
	}

	public void setOwnMedicineReceiptInformationId(String ownMedicineReceiptInformationId) {
		this.ownMedicineReceiptInformationId = ownMedicineReceiptInformationId;
	}

	@NotBlank(message="药材赋码信息ID不能为空")
	@Length(min=0, max=64, message="药材赋码信息ID长度不能超过 64 个字符")
	public String getOwnMedicineAssignmentId() {
		return ownMedicineAssignmentId;
	}

	public void setOwnMedicineAssignmentId(String ownMedicineAssignmentId) {
		this.ownMedicineAssignmentId = ownMedicineAssignmentId;
	}

	
	@NotBlank(message="企业名称不能为空")
	@Length(min=0, max=50, message="企业名称长度不能超过 50 个字符")
	public String getProcessingName() {
		return processingName;
	}

	public void setProcessingName(String processingName) {
		this.processingName = processingName;
	}

	@NotNull(message="出库时间不能为空")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	@NotBlank(message="新货主企业名称不能为空")
	@Length(min=0, max=50, message="新货主企业名称长度不能超过 50 个字符")
	public String getNewCorpName() {
		return newCorpName;
	}

	public void setNewCorpName(String newCorpName) {
		this.newCorpName = newCorpName;
	}

	@NotBlank(message="新货主企业编码不能为空")
	@Length(min=0, max=50, message="新货主企业编码长度不能超过 50 个字符")
	public String getNewCorpCode() {
		return newCorpCode;
	}

	public void setNewCorpCode(String newCorpCode) {
		this.newCorpCode = newCorpCode;
	}

	@NotNull(message="出库总重量不能为空")
	public Double getWeightAll() {
		return weightAll;
	}

	public void setWeightAll(Double weightAll) {
		this.weightAll = weightAll;
	}
	
	public Double getOutBatchAmount() {
		return outBatchAmount;
	}

	public void setOutBatchAmount(Double outBatchAmount) {
		this.outBatchAmount = outBatchAmount;
	}
	
	@NotBlank(message="出库对象不能为空")
	@Length(min=0, max=10, message="出库对象长度不能超过 10 个字符")
	public String getOutType() {
		return outType;
	}

	public void setOutType(String outType) {
		this.outType = outType;
	}
	
	@NotBlank(message="药材/饮片批次号不能为空")
	@Length(min=0, max=25, message="药材/饮片批次号长度不能超过 25 个字符")
	public String getBatchId() {
		return batchId;
	}

	public void setBatchId(String batchId) {
		this.batchId = batchId;
	}

	@NotBlank(message="规格不能为空")
	@Length(min=0, max=10, message="规格长度不能超过 10 个字符")
	public String getSpec() {
		return spec;
	}

	public void setSpec(String spec) {
		this.spec = spec;
	}

	@NotNull(message="出库总重量小计不能为空")
	public Double getBatchWeightAll() {
		return batchWeightAll;
	}

	public void setBatchWeightAll(Double batchWeightAll) {
		this.batchWeightAll = batchWeightAll;
	}
	
	public Double getUnitprice() {
		return unitprice;
	}

	public void setUnitprice(Double unitprice) {
		this.unitprice = unitprice;
	}

	@NotBlank(message="商品编码不能为空")
	@Length(min=0, max=50, message="商品编码长度不能超过 50 个字符")
	public String getSourceCode() {
		return sourceCode;
	}

	public void setSourceCode(String sourceCode) {
		this.sourceCode = sourceCode;
	}

	@NotBlank(message="追溯码不能为空")
	@Length(min=0, max=50, message="追溯码长度不能超过 50 个字符")
	public String getBmTraceCode() {
		return bmTraceCode;
	}

	public void setBmTraceCode(String bmTraceCode) {
		this.bmTraceCode = bmTraceCode;
	}
	
	@Length(min=0, max=64, message="所属企业标识长度不能超过 64 个字符")
	public String getCreateCompany() {
		return createCompany;
	}

	public void setCreateCompany(String createCompany) {
		this.createCompany = createCompany;
	}

	@Length(min=0, max=64, message="目录ID长度不能超过 64 个字符")
	public String getContentsId() {
		return contentsId;
	}

	public void setContentsId(String contentsId) {
		this.contentsId = contentsId;
	}
	
}